package day06;
//方法的演示

import javax.naming.InsufficientResourcesException;
import java.net.HttpRetryException;
import java.security.PublicKey;
import java.util.prefs.BackingStoreException;
import java.util.zip.DeflaterOutputStream;

public class methodDemo {
    public static void main(String[] args) {
       say();
       sayhi("zhangsan");
       sayhello("lisi",98);
       double a=getNum();
       int b=plus(29, 47);
       int m=30,n=58;
       int c=plus(57, 12);
       int[]d=testSArray(5, 100);
       int[] e=testSArray(3, 10);
    }
    public static void say(){
        System.out.println("haolou");
    }
    public static void sayhi(String name){
        System.out.println(name);
    }
    public static void sayhello(String name,int age){
        System.out.println("大家好，我叫"+name+"，我今年"+age+"岁了");
    }
    public static double getNum(){
        return 9.99;
    }
    public static int plus(int num1,int num2){
        return num1+num2;
    }
    public static int[] testSArray(int len,int max){
        int[] ar=new int[len];
        for(int i=0;i<ar.length;i++){
            ar[i] = (int)(Math.random()*(max+1));
        }
        return ar;
    }



}
